//
//  EMRiskDataModel.m
//  EasyMoney
//
//  Created by 邓乐 on 2020/1/11.
//  Copyright © 2020 zh. All rights reserved.
//

#import "EMRiskDataModel.h"
#import <UIDevice+YYAdd.h>
#import "WDPDeviceInfoManager.h"

@implementation EMRiskDataAppListInfo

// 直接添加以下代码即可自动完成
- (void)encodeWithCoder:(NSCoder *)aCoder { [self yy_modelEncodeWithCoder:aCoder]; }
- (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; return [self yy_modelInitWithCoder:aDecoder]; }
- (id)copyWithZone:(NSZone *)zone { return [self yy_modelCopy]; }
- (NSUInteger)hash { return [self yy_modelHash]; }
- (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; }
- (NSString *)description { return [self yy_modelDescription]; }

@end

@implementation EMRiskDataModel

// 直接添加以下代码即可自动完成
- (void)encodeWithCoder:(NSCoder *)aCoder { [self yy_modelEncodeWithCoder:aCoder]; }
- (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; return [self yy_modelInitWithCoder:aDecoder]; }
- (id)copyWithZone:(NSZone *)zone { return [self yy_modelCopy]; }
- (NSUInteger)hash { return [self yy_modelHash]; }
- (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; }
- (NSString *)description { return [self yy_modelDescription]; }

+ (instancetype)rickData
{
    return [[self alloc] init];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.os = @"1";
        self.appID = [[NSBundle mainBundle] bundleIdentifier];
        self.osVersion = [[UIDevice currentDevice] systemVersion];
        self.ip = [WDPDeviceInfoManager getIPAddress:YES];
        self.locationInfo = [EMLocationManager sharedManager].locationInfo;
    }
    return self;
}

+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
{
    return @{@"appList":[EMRiskDataAppListInfo class],
             @"contactInfo":[EMContactsModel class]
    };
}

@end
